import request from '@/utils/request'

export default {
  /**
   * 获取菜单列表
   * @param {*} data
   * @returns
   */
  queryList(data) {
    return request({
      url: '/energy-carbon/grass-core/menu/queryPage',
      method: 'post',
      data
    })
  },
  /**
   * 是否埋点
   * @param {*} data
   * @returns
   */
  buryingPoint(data) {
    return request({
      url: '/energy-carbon/grass-core/menu/buryingPoint',
      method: 'post',
      data
    })
  },
  /**
   * 启用禁用
   * @param {*} data
   * @returns
   */
  enableOrDisable(data) {
    return request({
      url: '/energy-carbon/grass-core/menu/enableOrDisable',
      method: 'post',
      data
    })
  },
  /**
   * 查询所有菜单
   * @param {*} data
   * @returns
   */
  queryAllMenu(data) {
    return request({
      url: '/energy-carbon/grass-core/menu/queryMenuList',
      method: 'post',
      data
    })
  },
  /**
   * 查询所有机构
   * @param {*} data
   * @returns
   */
  queryDeptList(data) {
    return request({
      url: '/energy-carbon/grass-core/dept/queryDeptList',
      method: 'post',
      data
    })
  },
  /**
   * 菜单编辑
   * @param {*} data
   * @returns
   */
  menuUpdate(data) {
    return request({
      url: '/energy-carbon/grass-core/menu/update',
      method: 'post',
      data
    })
  },
  /**
   * 菜单新增
   * @param {*} data
   * @returns
   */
  menuAdd(data) {
    return request({
      url: '/energy-carbon/grass-core/menu/add',
      method: 'post',
      data
    })
  },
  /**
   * 菜单删除
   * @param {*} data
   * @returns
   */
  menuDelete(data) {
    return request({
      url: '/energy-carbon/grass-core/menu/deleteById',
      method: 'post',
      data
    })
  },
  /**
   * 菜单详情
   * @param {*} data
   * @returns
   */
  menuDetail(data) {
    return request({
      url: '/energy-carbon/grass-core/menu/detail',
      method: 'post',
      data
    })
  },
}
